You can let the rocks touch the back. I have my rocks touching the back wall. It creates places for the fish to hide. Just be aware of the size of the cavities back there. You will need to force some water flow through there to prevent "dead spots" in your tank which can create some problems. I use a power head to force water through that area.
Why do I love fish? Because every time I stare into the little world I have created for them, every problem I have just floats away....