If you are a visitor, take your prescription to any pharmacy and they should be able to fill it. You will have to pay a prescription charge. You will also have to pay for the medicine itself (possibly unless you have an EHIC card - not sure).
Zafash Pharmacy near Earl's Court are very familiar with overseas visitors. Also open 24 hours.
www.zafashpharmacy.co.uk/