I always tell my doctors. I even had a doctor at one of the pain clinics I went to tell me that most people he sees would like to smoke and that it would help them, but they don't have the connections to do so (he said I was lucky I was in college and knew people...)

If your doctor has a problem with it, explain your reasoning. Legally, he cannot tell anyone. He can't do a damn thing. If he gives you a really hard time about it, consider going somewhere else, but it really shouldn't be a problem. I've only had one doctor really give me shit about it, and I've probably told over 30 (I have really fucked up health problems).