Yes you can get pregnant because my boyfriend and I had anal sex, a couple weeks later I did a test and was a positive test
It is possible, but it's exceedingly rare. One of the few known cases was due to a birth defect and incorrectly done surgery to correct that, leading to a connection between the rectum and the vagina that semen was able to pass through. The only other way is for semen to leak out, run down, and enter the vagina. Not impossible, but highly improbable.