There's nothing wrong with it per se but you should consider two things. 1) The writer's position/role/experience does carry weight. For example, your faculty members are in a position to comment on your quality and attributes (hopefully positively) compared to your peers. Having a faculty member say "I've taught for 30 years and XXX is in the top 5% of students I've had the privilege to know" is going to be meaningful. 2) Letters are typically going to include the capacity in which the writer knows you and how the qualities they've witnessed prove you're a good person/applicant/whatever.
tl;dr don't have your buddy who's a year older than you write something about how your technique chugging a natty lite demonstrates resilience in the face of adversity. Residents are dentists, and thus can write LoRs, but may not necessarily be the best option.