Sounds like a sig scope (sorry, I can't spell out the full, proper name). Whereas a colonoscopy scope goes well up into your large colon, the sig just barely goes inside. It's not supposed to hurt, although if you feel that you will be overly nervous, ask your doctor for a valium or something similar to relax you (make sure someone can drive you home).
Your doctor is undoubtably looking for internal hemmroids, which are the number one cause of bright red blood in your stools (the other main culprit is some sort of fissure, but there's usually a LOT of pain associated with that, and not necessarily any pain with the hemmies). It's not that common for them to bleed as much as you describe, however, so he may be looking in there to see if any of them need surgery or a little cauterization (both of which will be done when you're knocked out). If they are much swollen, that may also be the source of the pencil poo.
However, hemmroids will not cause diarrhea or smelly gas, so that's a separate issue. Of course, your doctor is going to handle things one at a time, but ask him about a breathalyzer test to check for bad bacteria in your gut. Bad bacteria (aka a bacteria imbalance or bacterial overgrowth) can cause diarrhea and is especially bad to cause really stinky gas. It's usually treated with some sort of antibiotic, followed by probiotics. Depending on what kind you have, though, it can be difficult to get rid of and might take several courses of antibiotics and probiotics to get straightned out.
You might also look into food allergies; there are tests for those, but they're not 100% reliable. Most people do just as well keeping a food and gut journal and putting two-and-two together when they eat something that then makes them sick.