Painful sex :( SLIGHT TRIGGER WARNING!!

Paris
Hi, so ever since I started having sex a few years ago, every now and then I experience pretty bad pain. It's a similar feeling to when you have a tampon in but there's not enough blood and it feels dry and uncomfortable. Any ideas why? Using a good lube helps majority of the time. 
 ***** also I have been raped so I know this could play a big part in it all. 
I am clean though and have a finance, I always feel safe with him so that's not a problem. But also having this happened to me, can it lower my chances of a successful pregnancy? We have decided to start trying for a baby.