It depends. The course materials and texts must be required for your program. For the Lifetime Learning Credit they must be paid to the school, but for the American Opportunity Tax Credit, if they are required for your program, they can be purchased elsewhere. If these costs meet the criteria, they are not deductible but they are eligible for an education tax credit. The expenses may be used towards a credit in the year they are incurred, not when the loan is paid back.
Q. Can you deduct education related expenses such as course materials/texts, etc.?
A. No?
It's not because of the source of the money (loans). It's because course materials/texts/books/computer are not qualified expenses for the Lifetime Learning Credit (LLC). Grad students, including Med students, are only eligible for the LLC and not the more flexible (and generous) American Opportunity Credit (AOC).