The carbon dioxide carried in the blood is actually combined with water and carried in the red blood cells in the form of carbonic acid, which has a dissociation constant:
H₂CO₃ ↔ H⁺ + CO₃⁻
When the pH of the blood decereases, the concentration of H⁺ ions in the blood becomes high. This causes the equilibrium to shift backwards, as per Le Chatelier's principle. The H⁺ ions are converted back to carbonic acid and the pH is increased. The opposite occurs when the pH is too high.