I'm not a lawyer, but if it's upsetting you so much, you should
insist that your doctor change your title on their records. If they need to have you as female somewhere in their records so they can provide services, that's understandable - but they cannot make your trans status known to anyone else as doing so would put you at risk of harassment and/or discrimination.
Are they trying to tie your title to their need to list your gender as female on their computer system? You can't tell me that a female professor or doctor needs to be called 'Miss' on their system so there has to be an 'other' field for people with other titles - just get them to select 'other' and change it to 'Mr'.
Speak (or write) to your Practice Manager and tell them that you are subject to indirect discrimination under the Equality Act 2010 because by giving you a female title on their appointments system and your prescriptions, they are revealing your trans status by gendering you incorrectly in front of other patients and they're also 'outing' you to pharmacists and their customers. That horrible feeling you described? That's harassment, and they have a duty to protect you from it.
Remember to be courteous in your correspondence, because you probably want to maintain a good relationship with the surgery.
Check out the Equality Act 2010, and the Gender Reassignment Act 2004. It's possible that you might need a Gender Recognition Certificate before you can really put your foot down - but mentioning the Equality Act to the Practice Manager should at least get them thinking. Try here for more info:
http://www.homeoffice.gov.uk/equalities/lgbt/lgbt-law/This doesn't always work, but what do you have to lose?
By the way... look out for those smear tests. My surgery gets me to fill in a form beforehand which asks for the "woman's name" and the "woman's date of birth" etc. Sheesh. It's very triggering...