It's always useful to have a letter from a professor at the program who can contextualize your grades; after all, admissions committees usually care about your relative performance (i.e your rank in a comparable cohort) rather than absolute performance (your grades). Ideally this letter would come from someone who can speak both to your research ability and your performance in coursework (so someone you took two or more classes with, and wrote a thesis under).