For doctors to do their job correctly, their patients NEED to be honest with them, and there's just no two ways about it.
Can he or she tell? Unlikely, since they aren't going to be looking for that. But it's not wise to not inform your doctor you've been sexually active if you're having unusual genital symptoms, because what you have may NOT be a UTI, and you'll want your doc to look for all the possibilities (and if he or she finds you have, say, chlamydia, you can omit all you want, love, but it's going to obvious you've been sexually active).
So, best bet for your health and well-being? Be honest.
Editor and Founder, Scarleteen
My epitaph should read: "She worked herself into this ground."
-- Kay Bailey Hutchinson