The dates are, please correct me if I am misunderstanding you:
Jan. 23 Sex with you
Jan. 31 Sex with another guy
Feb. 1 Period (presumably a normal one? to Feb. 4 approx.)
Feb. 7 Sex with another guy
March 12 Found out she is pregnant
The fast answer is that if her period came and was normal on February 1, and you did not have sex with her since her period but the other guy did, then the baby is his. Having a period is a big clue that a woman is not pregnant. The dates of February 1 for a period and March 12 to learn she is pregnant are relatively plausible too, it would mean her period was late, and she waited 12 days to test, and then she tested.
However, using a conception calculator and working back from the due date she gave you of October 24th, the first day of her last period would come up at around the 17th of January. So something does not match -- did she get the October 24th estimate from her doctor based on an ultrasound of the embryo, or did she just compute it herself? If she computed it herself, would she have any reason to push the supposed date of conception back a couple of weeks? (I.e., does she prefer that you are the father?) The conception calculator gives an ovulation date (for the 24th of October) as being January 31. This does not fit with the date of Feb 1 for the period to start. Even using the conception calendar and an estimated due date of October 24, it is unlikely that the baby could be conceived any earlier than the 27th of January at the earliest. And the Jan. 27 figure also allows for the length of time sperm can live in the female reproductive tract. So even given the Oct. 24 date she told you, it still doesn't sound like it is yours.
I would take the fact that a period came in between you having sex with her and the discovery that she is pregnant as being more definitive than the conception calendar.
That all said, you will need to take DNA tests once the baby is born to confirm paternity. The dates of January 23 and January 31 are too close together to leave the question open. Every child deserves to know where he or she comes from, and every man deserves to know if a child is his. Good luck!
According to this pregnancy date calculator, she got pregnant Jan. 31.
So, the other guy.