I have had conversations about this with other attendings. Most feel that it is better for students to ask for a letter of recommendation in person. Of course, sometimes, circumstances are such that you cannot ask in person. As axm397 mentioned, if you are in a different city, it may not be possible. But if you are in the same city, it's always better to schedule an appointment. Then when you are face to face, you can ask the attending for a strong letter of recommendation. By doing it in person, you can ascertain the attending's feelings, as axm397 mentioned. If you notice any hesitation or feel that the attending is not going to be fully supportive of your application, you can choose someone else. These are things that are hard to note when you communicate by email.
It's perfectly fine to ask an attending outside of the specialty you are applying to for a letter. Attendings receive such requests all the time. Don't be afraid to approach them.
Samir Desai, MD