Christine has already made some good points but I thought I'd add a couple more ideas.
I had a student who at two, had two servings of prune juice every day, a great diet fully of healthful things and LOTS of fiber and he still had trouble. Unfortunately, some kids struggle with this one and you should definitely keep communicating with your pediatrician about it. When the pediatrician prescribed mirilax, it made a HUGE difference for the little man, AND potty training was suddenly easier too.
Alice had a lot of trouble up until she was about two and a half. We used This method Link is to another question to help her pass the gas and get the other stuff moving along. If your son will let you do this "half moon" method (its totally hippie-granola kid yoga stuff, but if it works, it works) it may at least help with the gas - even at this age. If he doesn't like it, stick with the tummy rubs Christine Mentions.
Even if there is no history of allergies, allergies are on the rise, you may want to keep a food journal along with notes about his "movements" and seeming comfort/discomfort levels for a few weeks to see if you can divine any patterns.
My whole family is sensitive to dairy and though only my sister is lactose intolerant we all have troubles if we eat or drink a lot of it, or eat it too regularly (1/3 kids actually has a dairy sensitivity - though it is less in white communities) so Christine is right on the money to bring this up as a question - especially since you mention that he drinks a lot of it. Try a week without it and see if it helps. There are TOnS of wonderful replacement drinks that still offer Calcium and Vitamin D is easy to get access to as a supplement. OF COURSE talk to your Pediatrician about it, but seems worth it just to knock it off the list and be sure it isn't a problem with dairy to me. Removing dairy for a week will not hurt and if it helps, then you've won an answer to your problem.