Once you introduce warp drive and transporters, you're making a statement that realism is secondary to the storytelling.
On the contrary -- using warp drive made
Star Trek more realistic than its contemporaries. Look at virtually any other science fiction TV show from the '50s, '60s, or '70s -- they all portray interstellar travel as indistinguishable from interplanetary travel, just firing a rocket or drifting from star to star.
Lost in Space made a cursory reference to hyperdrive in its first episode but otherwise just had the ship move between planets and star systems as easily as a car driving from town to town.
Space: 1999 had the literal
Moon just drifting from star to star every week, with only a couple of cursory references to space warps. Those guys didn't know what they were doing. They didn't care enough about realism to bother doing their research. Roddenberry, by contrast, did his science homework. He acknowledged that the speed of light is a limit on normal space travel and that it would require some hypothetical form of space-warping drive -- a concept grounded in Einstein's equations of General Relativity, and thus scientifically literate rather than fanciful -- in order to make interstellar journeys.
And there's been a fair amount of grounded, hard science fiction about teleportation too -- Larry Niven did a whole series of stories on the theme. Hard SF doesn't mean limiting yourself to known realities -- it's not SF at all if there isn't some currently nonexistent phenomenon in it. It means that if you do postulate some hyperadvanced, even unlikely technology, you ground it in as much plausible science as you can. The idea of converting a material object to energy, transmitting it, and reassembling it may seem fanciful to us, but to people in the early to mid-20th century, it was a relatively plausible premise. The equivalence of matter and energy is derived from Einstein's work (E = mc^2), and to writers and readers at the time, it seemed plausible that if you could transmit radio or television signals from site to site, there might eventually be a way to do the same with material objects. And indeed quantum teleportation is a real thing now in a way, at least where single particles are concerned.
Besides, there's a reason it's called "real
ism," not "reality." It doesn't mean being exactly real, it means adopting an artistic style that mimics reality. (Like how cubism doesn't mean just painting actual cubes, it means painting other things in a cube-like style.) In the case of fantasy and science fiction, a realist style is often used specifically to
contrast the imaginary, impossible elements in a work in order to facilitate the audience's suspension of disbelief. I think it was Richard Matheson's rule of writing fantasy to postulate one impossible thing and make everything else around it as grounded and realistic as possible, which would make the impossible thing feel more believable as well.
Richard Donner used this same approach in
Superman: The Movie, making "verisimilitude" his buzzword and striving to make the Metropolis (New York) scenes as grounded and realistically textured as possible, to try to make the impossible fantasy of Superman
feel like it was really happening in the everyday world. The movie's actual tagline was "You will believe a man can fly." Of course that doesn't mean that the movie hoped to convince the audience that a flying man was
actually real -- the goal was to make the unreal
feel real through how it was presented to the audience, by depicting its context as realistically as possible.
Roddenberry was doing the same thing. He knew he couldn't make his version of the future completely real, but he wanted to use realism where he could in order to balance out the more blatant impossibilities and make the show as a whole feel more plausible. More importantly, he strove for
character realism. No matter how fanciful the phenomena the characters encountered, he wanted them to react to them like real human beings would, which would make it easier for the audience to buy into them through their identification with the characters.