First, go see a doctor. Run tests. I used to get lower back pains after squatting also. Stretching helped me. I wasn't flexible at all and by stretching only 10 to 15 minutes/ day my back pains almost totally disappeared and at the same time my squats went deeper. Front squats are a pretty good alternative if done with good form.