To each his own when it comes to investing, but time is money. Federal loan rates are currently extremely low (less than 3%). The interest is not compounded until after you complete medical school (a big bonus). While your income is low (for example during residency) some of the interest on these loans is tax deductible.
Taxes will be negligible to non-existant on investment income during medical school since your income will be so low you will likely not be required to pay taxes.
If interest rates rise, you can always take the money out of the investment and pay back the loans. There are many investments that are much safer than any individual securities, most bond funds have historically returned better than that 3% year after year after year (even now). Look for some short- or intermediate-term bond funds at a discount fund family like Vanguard. And putting into a house might be a good idea as well (although with mortgage rates so low, I would even advise borrowing equity out of your home and trying to beat the rate in the market).
3% money with tax deductible interest is practically free money. Don't pass it by. You might be kicking yourself later. Investing in yourself is taking advantage of good opportunities when they come along. This 3% money won't last forever.