First of all, take him to see your pediatrician if you haven't already.
My daughter had the same problem. To break the cycle (my daughter's bowels became stretched out), the doc had us give her Miralax for several weeks (to let her bowels shrink back to the regular size). ALSO - changes in her diet: switched to "double fiber" bread (Brownberry/Orowheat makes some, sold at Jewell), added probiotics like Kefir (which adds good flora to the intestines to help digestion), cut back on the cow's milk and switched to Soy Milk for a few weeks (cow's milk is constipating, soy still has protein), switched to "whole grain" snacks (even Goldfish come in whole grain), and made her drink tons of WATER WATER WATER (that's really important for avoiding constipation)! Also, oddly enough, our pediatrician said that bananas and grapes have been found to constipate younger children (that was a surprise to us).
Will he eat whole grain pasta? Read the packages, wg pasta, even rice, have fiber and protein.
Good luck, I know it's so hard to see them in pain!
M.