It could very well be a gluten problem. Like Heather said, a gluten problem could be either an allergy or an intolerance. There are differences between the two, but also you can't always separate the two in every way. Doctors are still trying to understand these growing problems. A blood test will show if it's an allergy, but an intolerance is much harder to diagnose. I've found this to be a good book about what is known:
http://www.amazon.com/Food-Allergie...=sr_1_1?ie=UTF8&s=books&qid=1274240081&sr=1-1
It talks a lot about both allergies and intolerance, but spends a little more time on intolerance since it is the less understood one that is harder to find information about.
One reason intolerance is tricky is because sometimes it takes a long time after you eat something for the symptoms to show up - only after it gets to a certain part in your system. So it's hard to figure out what food is causing it. But it also can still happen right after you eat just because of the mechanics - when you eat, you contract your bowels (sorry for being gross) and force stuff along. There are typical cases of food allergies but there is no typical case of food intolerance.
But there are many other possibilities. It's good to try and figure out if it's related to specifically what you are eating. If it always happens no matter what you eat, maybe it's not related to your diet, and then it's probably not an allergy or intolerance. But if you can, get the blood tests done before you experiment with your diet. If you stop eating gluten, it will be even harder for blood tests to find a gluten problem.
You would also want to rule out Crohn's disease, ulcerative colitis, diverticulitis, polyps, etc. There are so many different diseases that give problems with the "#2."
Sorry for being gross, but also look for blood. And it doesn't matter how much you see, either (in fact, sometimes it's better to see more blood than just a little bit, and sometimes it's worse to see it when you're not feeling any pain. If you ever see a little bit when there's no pain, get a colonoscopy and make sure it's not polyps, which sometimes are cancerous). Looking at your family history may also give you some hints. It can be embarassing, so maybe your family members haven't told you about it.