In YOU ONLY LIVE TWICE, M notes in his obituary of Bond:
'By now it was 1941 and, by claiming an age of nineteen and with the help of an old Vickers colleague of his father, he entered a branch of what was subsequently to become the Ministry of Defence. To serve the confidential nature of his duties, he was accorded the rank of lieutenant in the Special Branch of the R.N.V.R., and it is a measure of the satisfaction his services gave to his superiors that he ended the war with the rank of Commander.'
Note that this does not say that Bond saw action in the RNVR, but that his rank was cover. The most likely intelligence outfits to need this would be those connected to and arising from the Special Boat Section.
Or Naval Intelligence, of course - but then, they didn't go around assassinating people.
Bond could also have been seconded to the British Security Coordination in the early part of the war: after all, they were based in the Rockefeller Centre in New York, and did have a Japanese cipher clerk working below them (something Fleming saw for himself when he visited).
Fleming said in his interview with Playboy that Bond was 'a sort of amalgam of romantic tough guys, dressed up in 20th Century clothes, using 20th Century language. I think he's slightly more true to the type of modern hero, to the commandos of the last War, and so on, and to some of the secret-service men I've met, than to any of the rather cardboardy heroes of the ancient thrillers.' (My emphasis.)
WW2 commandos Fleming was friends with include Patrick Leigh Fermor, Anthony Terry... and David Niven.