I have had the same problem (still have 2 of them). When I got the first one my midwife told me to use Anusol (you can get it over the counter)which helped but when the second one came it was so painful I didn't know where to put myself.
I spoke to a doctor the next day and she suggested putting ice on them throughout the day, this helped at the time but when the numbness had worn off it was just as painful.
I suffered for another day and in the end went to see another doctor who told me to use Vagisil (a thrush cream you can get over the counter) it is 2% Lidocaine which is a anaesthetic, he told me it was safe to use in pregnancy to apply it morning and night (8am and 8pm) and use the Anusol between.
After doing as the doctor said for 2 days I was running around after my 2 year old little man as usual with only a little tenderness when wiping, the piles are still there now but a lot smaller and not causing any discomfort.
I hope this helps, I never realised how painful piles could be so have so much sympathy for you, hope your feeling better soon and good luck for the birth.
Kind regards
Beth