I agree with DrJD about the time in. Most of the radiation oncologists I know had a 5 year residency and I believe that's usually followed with a fellowship. Plus, if you account for things like maternity, time off for travel, sickness, research, etc. I don't think 7 years would be all that uncommon.
I disagree that the high salaries are there necessarily to attract high caliber doctors, although, that does play a part in it.
Salary is all about negotiation. Medical doctors are notoriously good collective negotiators, thanks in large part to the trump cards they hold.
One of those cards is what DrJD and others have explained - that there is a tremendous time and finanacial investment required. (It's not surprising that this, on its own, doesn't fly in a forum frequented by post-docs.) But this is a valid point. Substantial investment needs to yield substantial reward.
Another card is responsibility. Medical doctors traditionally assume ultimate responsibility in the health care system. They're the ones who sign the prescriptions. They're the ones who get sued when mistakes are made. They're the ones who are subject to committee investigations. In contrast, engineers most often work under the umbrella of a corporate entity. If a bridge collapses, the company that built it gets sued, rarely the individual engineers. (And really, who get's sued when Windows Vista doesn't work?)
Another trump card is fear. Not to sound too much like a left-wing hippie, but we can place at least some blame on drug companies and mass marketing tactics for that. Your health is the most valuable thing you have and marketing campaigns for everything from antibacterial sprays, to cold medications to erectile disfunction treatements pray on that fear. When it comes to your health and the health of yoru kids, you don't want Bargain Bob's Discount Drugs.
Another trump card is professionalism, which has a lot of faces. Medicine is largely a self-regulated profession. It has historically established itself at the top of the medical professions hierarchy. It has even legislated itself so many responsibilities there will always be a demand for doctors. As others have pointed out it even controls (to an extent) the supply of new doctors.
Another trump card is the legal restriction of medical practices, such as the prescription of drugs, or even the ability to make a diagnosis. Paramedics and nurse practioners are perhaps infringing on this territory a little, but the fact of the matter is that just about everyone needs (arguably) a prescription for a medication at some point and medical doctors are really the only ones who can do that. If you constrast that with engineers, you can have Joe Blow off the street design, build and repair your product, and do all the heavy lifting so long as you have the work inspected and signed by certified engineers at the critical points.
If I needed an engineer to inspect my car and sign off on it every time I needed to change the oil, things might be different.