first thing you need to do is confirm your pregnancy
with urinary pregnancy test kit which is available over the counter on the pharmacy.
Both x rays and painkillers could be harmful in pregnancy so you need to confirm the test before going for the same.
In case if it is positive and you still want to continue it there investigation like MRI
and few blood test
like cbc, esr
, sr calcium, sr vit d, to rule out sinificant causes of back which could affect you in the pregnancy.
if your pregnancy test is negative then you can go through all investigations as adviced by your orthopedic doctor before planning a pregnancy