Actually, there's nothing wrong with studying such a course. Normally, modesty is the rule of thumb. But let's face it, it's most normal for doctors to be men. That's how it was throughout history until a few dozen years ago. Even now, I think men make the best doctors. A doctor needs to be rational, logical, (un-emotional and detached -- especially during surgery) and not overly emotional.
Women make good nurses, and perhaps pediatricians (since their natural mothering/nurturing skills come in handy).
Anyhow, if you are a doctor you have a good REASON to look at things that are normally off-limits. In that case it's a necessity, done for a greater good.
Now a doctor (like any man) needs to develop control of his passions, a high degree of most (if not all) of the virtues, and that will help him to do his work.
Nevertheless, I suppose a man who is particularly weak against certain sins might want to avoid becoming a doctor -- but keep in mind that virtue becomes easier with practice.
Temptations can be offered up as a sacrifice to God, and He is pleased to see us fight them -- as long as they're not sought out on purpose. But if your line of work presents them, you're not at fault. If it's God's will for you to be a doctor, then He WILL give you the grace to avoid sin in that line of work.
Matthew