Theoretically, could the basilisk 'turn off' its petrifying power? Or is it something the basilisk has no control over?
Possibly...if it can close its eyes
The male has a scarlet plume upon its head. It has exceptionally venomous fangs but its most dangerous means of attack is the gaze of its large yellow eyes. Anyone looking directly into these will suffer instant death.
—Fantastic Beasts and Where to Find Them
This would seem to indicate that anyone who does not meet the gaze of the Basilisk's "large, yellow eyes" will not die. The Basilisk could prevent this fairly easily by closing its eyes.
Keeping its eyes closed would not greatly hinder the Basilisk, since it appears to possess a keen sense of smell.
"THE BOY IS BEHIND YOU! YOU CAN STILL SMELL HIM! KILL HIM!”
—Harry Potter and the Chamber of Secrets
But, real-world serpents cannot close their eyes, since they lack eyelids!
In snakes, there are no eyelids and the brille is clear and cannot be distinguished, except when the animal is becoming ready for ecdysis.
Of course, the Basilisk is an fictional beast, and may possess eyelids, but if it is similar enough to a real-life snake, it may be incapable of closing its eyes.
As to whether the Basilisk could turn off its power even with its eyes open, I don't think it could, but there is no canon indication one way or the other.
The answer is clearly NO
Here's my reasoning.
Mrs Norris was petrified by accident: the Basilisk was after 'Muggle borns' or Harry, so the cat is definitely an accident. This above all shows it's not turning it on and off at will - it's always on.
As stated snakes have transparent eyelids (it's categorized as a snake in the books and in the 'book within a book' that Hermione reads - anything that's classified as a snake has similar characteristics: otherwise it would be classed as a serpent, the broader category that includes all snakes).
It's implied that you have to look at it AND it has to look at you for it to be deadly (otherwise shutting yours eyes would be useless). No animal on the planet can turn off their eyes (I don't mean closing the eyelids) so why would the basilisk be able to do it at will?
No-one in there right mind would bring this creature into this world, unless you can talk to snakes, it's deadly to everyone, simple.