Not in residency yet, but i think its possible. There was one resident during my Sub-I who was on L&D nights. She would change to go to the gym after morning sign out. Many people rode their bikes in. I walked 15 mins each way. I think especially if you do workouts out home it will be possible. You don't have to factor in the time and transition to and from the gym.
My fellow interns who do exercise on a regular basis seem to do so without too many problems because they make it a priority. The one exception to that is one of our night float rotations and sometimes Gyn/Onc. It is all about what is important to you and how motivated you are.
It's definitely doable if you make exercise a priority. I ran competitively in college, so I set a goal of going for a run every day, if for no other reason than I don't want to embarrass myself when I get the chance to meet up with my former team mates. I confess I rarely meet that goal, but in general I still get out the door 5-6x week, though that fell to 3-5x week on Onc and L&D.