For this post, I will make some assumptions. Since OP seems to be keen on paying down large debt without mentioning an income based repayment plan in the initial post. I'll just run some quick numbers to see what life looks like if you wanted to repay these loans.
Lets say you have $400,000 debt from medical school and you do a 4 year residency. During that time, only minimal payments are being made as you elect to enter one of the income based repayment plans.
Your total debt at the end of residency will be about $500-$520k give or take a bit depending on which IBR program you enter into and your monthly payments.
This means that in order to pay off the debt in 10 years outside of an income based repayment plan, one would need to pay just over $7,000 a month.
Now, lets say you make pretax about $250,000 a year. After taxes and if you elect to contribute to your 401k this may be about $12,000 a month. This leaves you with $5,000 a month for all other expenses. This includes building a 6 month emergency fund, saving for a house or new car, rent and daily living expenses, saving additional money for retirement.
OP, yes it can be done. However, there will always be road blocks along your financial path to freedom from debt. Will you be getting married, having kids, need doctors appointments, pay for a nanny, support an aging loved one? There are many things that can happen in the next 10 years financially, and its impossible to plan for all of them. But taking out $400,000 in debt and not considering this as a life changing decision, potentially for the worse even with doctors high levels of income is short sighted. This will affect every aspect of your adult life and this decision should not be taken lightly.