Technically, you can't replace grades on your transcripts. If you retake the courses because you want a better grade to raise your G.P.A., then you certainly can do that. However when G.P.A. is calculated they will still take your 3 C's and the D into account along with the new grades you received.
Basically, when you retake courses to raise your G.P.A. you are just adding to the number or units/credit hours taken when the G.P.A. calculation is made. The C's and the D will never go away.
Some schools will take into account that you retook the course and received a better grade, so it might be worth it.