Two different issues have been raised here: the weekend a month and two week per year commitment, and being deployed (presumably for 12+ months, which seems the standard now).
As for the first, most residency programs would work with you on that. Many reserve units will be flexible with the "weekend per month" -- and if so you can do no weekends on your call blocks and then "make up" the weekends on non call blocks. Unfortunately, that can consume many of your free weekends.
The two weeks a year either have to come out of your vacation, or can be treated like an LOA. In the latter, you'll probably need to make up the time at the end of the year, so you'd end up 4-6 weeks off cycle by the end of training. This is no big deal.
If you get deployed, that causes a big problem. With enough notice it could be integrated with your training, but I expect the military really won't care about that. When you return, I would hope that your program would take you back. However, programs are "capped" at a certain number of residents, and once a new resident is hired to replace you there is no guarantee that a spot will be available. The RRC can allow a program to go over their cap, and then there can be funding issues, etc.