Intercourse, even if unprotected, around a period is always safe. Provided, you have 28-30 day cycles, when your ovulation would fall around 14th-16th day, you were in the safe period when the activity occurred. In the rare occasional case of very short cycles, this happens to be the fertile period. You can exclude/confirm pregnancy
by a blood test
about a week prior to the onset of the next period. If negative, the cause of the current spotting episode could be due to hormonal
imbalance perhaps due to stress
. Please get further help in person by an expert. Wish you good health.