There isn't a template. And honestly, it will look much better if the letter 'sounds' as if it is the doctor's own words (even if you write a suggested version and leave it to the doctor to alter as he wishes). Points it would be good to have him cover, for instance:
He is a doctor in general practice in (wherever). In the course of his work, he has had (the first partner), living at (whatever address), as a patient since (whatever date). On (whatever new date), (the second partner), who had just formed a relationship with (the first partner), moved to the same address, also registered with him, and both the couple have continued to consult him for the (however long it is) since that time. Of course, if by chance the doctor is a family friend or knows you socially, so he knew how you first met, or met you both regularly at some interest group (e.g. if you all played tennis or went to music concerts), he could usefully mention that, too.