Try to work hard, be humble, careful, responsible and simply impress your attending physician/surgeon. Ask him about LOR only after you have done some good work with him. Few students try to take things for granted and expect LOR as their right at the end of elective. It never happens like this and the attending physician/surgeon may dislike this behaviour.
Be careful and appropriate about everything during your elective. Every little thing may count. The attending may ask the fellow you are working with to write the LOR for him at the end of month and your LOR may say everything that fellow thinks about you, not necessarily the attending. So every little thing counts.
Work hard with full devotion and dedication and you would get your wonderful LOR!
source