Actually, one should note that Kirk sees no fault in Spock's doings here, nor is he defending Spock for providing unpleasant data since he has provided none - instead he's specifically chastising Dehner for not providing unpleasant data. So his words, not directly addressed to anybody in the semantic sense, should be taken in this context; they are addressed to Dehner in the logical sense.
Thus it's quite possible that Dehner is Kirk's science officer (one of the many, as the ship must have dozens) in this bit of dialogue, not Spock.
But the way the scene plays makes it pretty clear that Spock is the one referred to; immediately after mentioning the science officer and his duty, Kirk tells Spock to "Go ahead" and finish reporting his information.
The shooting script excerpted in TMoST also identifies Spock as science officer, though elsewhere in the same book it says Spock was second-in-command in WNMHGB.
I would say that Spock wearing the command badge in WNMHGB is pretty strong evidence that he was F/O, probably in the same "two hat" arrangement as in the rest of TOS. If only one other officer is seen wearing the same insignia as the CO, it's pretty hard to argue that it would be someone other than the second-in-command.
Perhaps the change in Spock's colors coincided with the changes in uniform that happened sometime soon after WNMHGB. Maybe the new regulations allowed more leeway in what division colors an officer could wear, so Spock took the blue option.
Doesn't the writer's guide say that Kirk commanded a ship analogous to a destroyer before he was put in command of the Enterprise?
That is what is stated in TMoST, page 215:
Kirk rose very rapidly through the rank and received his first command (the equivalent of a destroyer-class spaceship) while still quite young.
--Justin