I'd suggest letting the attending know when you very first meet them (I don't mean the first words out of your mouth...more like right before you leave) that you "are interested in getting a LOR if you think I merit one after working with you." This doesn't put them on the spot later, gives them an early opportunity to tell you to go *&^% yourself (so you can place your efforts elsewhere), or more importantly it may cause them to pay more attention to you when you're around and possibly get to know you better resulting in a better letter.
It doesn't really hurt, either, to approach the chairman at the outset of a rotation to let him know that you would be interested in a letter from him at the completion of the rotation, if he feels comfortable. I got one from a chairman I worked very little with; he simply spoke with the underlings and wrote a very nice letter.