we had constipation also, my 2nd used to get constipated when he ate rice cereal (even a small amount) so I gave him oatmeal, which helped a lot, with my 3rd he was worse, we had to give him suppositories on occasion, then the dr had me put a half teaspoon of B. sugar in his milk (4 oz or 1 teaspoon for 8 oz) I did this for every bottle, but it worked! I have also used warm apple juice which works in a pinch as well. (the pear juice sounds good also)
My second child had wetting problems and his ped. urologist had me giving him miralax, which did make is stools softer but I had to give him a lot of it for him to poop every day. I asked about the magnesium citrate and the dr said that it was okay for once in a while but not for everyday that it would tear up the inside of the intestines so be very careful with that one, check with your Dr and DO NOT use it everyday!!!
Constipation seem to be a way of life at our house, it can also affect potty training, (day and night training) which if you want more details on that email me, I'll be glad to share that experience too. I've tried increasing fiber foods but my 2 constipated kids are picky eaters! Avocados and black beans are very high in fiber, if you can get your child to eat them it may help... my 2 wont touch the stuff!
try the B. sugar! if that doesn't work keep talking to your Dr. to find other ways to improve the situation. best of luck!