your doc is right.
If you are getting more cramps and spasms, chances are that there is at least one muscle permanently locked in spasm - usually to protect another, damaged muscle.
You can wait it out ( it will heal), only stretching and twisting *very* gently and when warm (really warm, like in a hot bath).
Or you can seek out a decent chiropractor. That will hurt wallet and back a little more in the short term, but should be better in the medium and long term.