In the absence of red flags signaling a more serious problem, you have several options open to you. Your physician is offering you advice we call “best practice” medicine. He or she has obviously kept up with the latest studies and published clinical practice guidelines (CPGs).
These guidelines are based on current evidence that strongly supports staying active during acute episodes of mechanical back pain. Mechanical back pain means it’s not caused by an infection, a tumor, or a spinal fracture. More likely there is some soft tissue, disc, nerve, or joint as the primary cause of the pain.
Whereas walking and biking are done more in a straight plane, golf does involve a lot of twisting and rotation, which can be contributing to your problem. Letting the tissues heal before adding stress to them is a good idea.
You can seek the counsel of a physical therapist who has some expertise in the area of golf. Some therapists attend courses at the Titleist Performance Institute (TPI) and are TPI certified. This person can help evaluate your swing and other golf mechanics that could be contributing to your low back pain. The therapist can help you progress through the appropriate exercises you might need in a way that will protect your back from future injuries.