Sure. Basically, the pills work in three ways. They keep you from ovulating, they make the cervix really mucusy (if that's a word!) so sperm can't get through, and they make the uterine walls uninhabitable, so an egg wouldn't be able to implant and grow if it did happen to come around. Since the bcp's stop you from ovulating, there is not a chance that you can get pregnant on your period, while your body is shedding the tissue buildup. On the pill, your period is just shedding some extra tissue, it's not actually disposing an egg. So there is nothing to fertilize! And when you start taking the pill again, it will keep your body from producing another egg, and keep you from getting preggo.

You can't actually get pregnant when you're menstruating, anyway, on or off the pill. But you can't trust that you won't, normally, because many women either have a random cycle once in a while where they produce an egg earlier than usual, or they don't have a good handle on their cycle and when they ovulate. But since the pill regulates your cycle so you KNOW you haven't ovulated, and you KNOW that you will not ovulate again earlier than usual, it's perfectly safe on the pill.