All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
There is no doubt that having intercourse with one's wife during menses is forbidden as Allaah Says (what means): {And they ask you about menstruation. Say, “It is harm, so keep away from wives during menstruation. And do not approach them until they are pure. And when they have purified themselves, then come to them from where Allaah has ordained for you.}[Quran 2:222]. Therefore, whoever has committed this sin, he should sincerely repent to Allaah in addition to being obliged to expiate for it. For more benefit, please refer to Fatwa 84636.
As regards becoming pregnant in that month, and fearing about the child, then there is no need to worry about this because a woman cannot become pregnant from intercourse which took place during menses, as the doctors say.
What is required is to endeavour to cultivate the child according to Islamic principles, and in this way the child will become righteous, Allaah willing.