Kirk wasn't allowed to divert to Vulcan in "Amok Time" because there was a scheduling conflict. He was allowed to divert to any number of other places as long as he met his scheduled commitments, though. Apparently, Starfleet didn't charge him for the fuel or the lightyearage. Or keep close watch on where he had actually been, for that matter (else e.g. his marooning of Khan could not have remained a secret).
Admittedly, when Kirk arrived at SB 11 on "The Menagerie", his seeming impromptu course change raised lots of eyebrows. But that was only natural for the people at the receiving end of Kirk's surprise visit - we don't learn whether anybody else would have been concerned.
Timo Saloniemi