Any headaches you may have during the fast- and they aren't common on a fast by any means- will be milder than you are used to more than likely. And you can rejoice in the knowledge that whatever is causing the headaches is leaving your system as you fast and when the headache is gone so is most of the likliehood that you will have more headaches in the future. The painkillers can only interfere with the progress of the fast and your healing, and more than likely will not be good on your empty stomach so be brave and 'grin and bear it' as they say. Again I say it isn't all that likely even if you do experience headaches at other times- I have suffered severe headaches/migraines over the years that have left me bedridden for days at a time, but since fasting in August last year I have had none, including on the fasts I have completed.
Good luck losing the weight. If you're set on a definite amount of weight loss my advice is to fast until you are below your goal weight and then refeed up to the weight. The way fasting works ideally is to fast until you have no fat stores left at all and then when you refeed your body finds it's 'perfect weight' all by itself. That doesn't have to be your goal of course but do allow for some adjustment during the refeeding/recovery period as the body will be eager to restock it's supplies so to speak.