That would depend on how one looks at that episode.
Is that episode part of the same continuity as the rest of the TOS episodes?
I think most of us would say "Yes."
Personally, I would say that the broad strokes are canonical (i.e., this event happened, more or less, as we saw it on the screen), but that some particulars are better off when you don't think about them too much.
The "James R. Kirk" originates from Gary Mitchell, not Kirk himself from an in-universe POV.
How trustworthy is Mitchell in this case? Was it a deliberate mocking of Kirk or are they on a slightly different continuity than the rest of the TOS series or was it a mistake? If it was a mistake, that again points back to Mitchell's mistake although it would appear that it was deliberate mocking, IMO.
Most of what we get in Star Trek comes in the form of testimony. Even if Kirk told us directly that his middle initial is "T," it might
be the case that his middle initial is R (for Rupert) and he is so embarrassed by that name that he quietly changed it). The point is, we have to trust the Kirk is also honest and competent.
Again, fans have worked out many contradictions in testimony on the grounds that they are only apparent contradictions (e.g., Mitchell was wrong or mocking in that moment). And this is fine, but the upshot denies Timo's position that there is no reason to reject Mitchell's "James R. Kirk" on the grounds that it is more unreal (in this case he is allegedly merely confused or mocking) than claims of "James T. Kirk" in the series.