I also did this with my OCHEM professor (after a retake). I'm pretty sure it ended up being one of my best letters! I think it's a great idea because they can write about your growth/improvement/etc.
A letter from any professor who can attest to your motivations, interpersonal skills and academic aptitude is, imo, a valuable letter. A good relationship, as stated above, implies this so go for it1