Write what you know? Only what you know? Wouldn't that be, well, a bit limiting? Boring too, for you as a writer, and your reader as well.
If we're to write only what we know what the heck is that imagination we've been gifted with for? And what about the visionaries who've come before? Jules Verne, H.G. Wells, and so many others. Did they have intimate knowledge whereof they wrote?
If you don't know about it you can't write about it - right! How silly is that?
I have a theory. When that old saying was first said I believe the person who said it meant it in reference to a general state - a sort of life experience state; not a literal if you haven't been to the moon you can't write about it or if you haven't seen a vampire you have no basis for your writing.