Can I still get pregnant when I had sex a day before ovulation?

Yes. Actually conception is more likely when the sperm are present in the fallopian tube in advance of ovulation.