I would be very cautious with the tax-deferred annuity. Here are a couple things to consider: First, though the annuity advertises itself as being "tax-deferred," it might not be what you think. Your gains will be taxed at normal income tax rates, rather than long term capital gains rates. That alone eats up your earnings when compared to a more traditional tax-deferred vehicle. Also, make sure that the annuity is within an IRA - otherwise, your gains may be tax-deferred, but not your contributions. Annuities themselves, remember, are products - which means that the institution/agent/etc selling it to you will make a profit somehow. This usually comes in the form of miscellaneous expenses. Finally, the investment options within the annuity itself tend to be sub-par, and can just be darn hard to change around if you decide to do so.
If I were you, and didn't have a match on my 401k, I would probably max out my Roth IRA and put as much as I could in my 401k, in that order. (As soon as you leave residency, consider converting your 401k into a traditional IRA for better investment options and lower fees. In your first year out, while you are still in a lower income bracket, you might also just roll the 401k into an traditional IRA and then into your Roth IRA so you can collect tax-free earnings 30 years down the road. You can also contribute to a spousal IRA if you are married.)
If you wanted to pay off your loans faster, I would consider maxing out your Roth (at least!) and, in the absence of a match for your 401k, use the rest of your available funds to them off.
The only time I would consider an annuity in residency is if I had maxed out my Roth IRA, 401k, paid off as much as I could possibly want to with respect to my loans, and maxed out a spousal IRA. Of course, if you can do all of that during residency, then you're probably doing fine regardless of what you chose to do with your investments.
Just my $0.02. Good luck! 🙂