If it is proven medically that this pain cannot be relieved except by wearing high-heeled shoes, then there is nothing wrong with you wearing them, whilst making sure that your wearing them does not involve any wanton display of adornment (tabarruj) or attract men's attention. Rather you should try to cover them as much as you can.
There is no specific ruling concerning high-heeled shoes with regard to the matter of prayer, so it is permissible to pray wearing them as it is permissible to pray wearing any other kind of shoes.
And Allah knows best.
Reproduced from Islam QA