While you are most likely to get pregnant approximately halfway between periods, it is still possible to get pregnant during your period. Not common, but possible. If you have unprotected sex and do not want to get pregnant, you may want to take a morning after pill to help prevent pregnancy. There is really no safe time unless you are already pregnant!
If you had your period, you can't be pregnant, as long as your period was normal as always. Sometimes women can have bleeding during pregnancy and mistake it for a period, but if that was your normal period, you have nothing to worry about. Though in the future, you need to use protection if you don't want to get pregnant. You are playing with fire by having unprotected sex and you will get pregnant if you continue to do that. Use this as your learning lesson to be more careful next time. Take care.