In Balance of Terror
, it is apparently OK to have ones fiancé as immediate superior officer. I don't find that very realistic or likely, but there it is.
Whether it is legal or not, it would open the captain up to criticism and accusations of conflicts of interest, and potentially affect his judgment and decision making. It wouldn't really fit with what was shown of Kirk's character. The way I see it, he can be a consummate professional captain, or he can be in a K/S relationship, but not both.