You're probably straining too hard and ripping the skin of the rectum. Why not try taking one spoonful of olive oil every day (by mouth)? It does wonders for the consistency of poops without medications.
Annie made a good point. Straining to hard can cause very small tears that can cause the bleeding. If you’re noticing that you are bleeding no matter what the consistency of the stool is, you could have small cuts higher up your GI Tract. I would contact your doctor if it continues and ask for a colonoscopy