The phrase "write what you know" is a misnomer. It doesn't mean that if you're a lawyer, you have to write about lawyers; if you're a policeman, you have to write about the police; if you're a housewife, you have to write about housewives; if you're a crack head, you have to write about crack heads. It doesn't mean that since I'm in the military, I have to write about the military.
"Write what you know" doesn't mean you have to put characters in situations with which you are personally familiar; it means you have to put a piece of yourself in each of your characters.
Your hero has all of your best qualities as well as some of your flaws. Your villain is comprised of your dark side, your evil alter ego, the you that might have been. Each of your supporting characters is part of you as well. They have some of your hopes, your dreams, your thoughts, your habits.
This isn't to say that you have to be a cold-blooded killer to write about one. I mean that you need to ask, If I was a cold-blooded killer, what would I do, how would I act, what would I dream? Use personal experience when possible. Did a particularly traumatic experience happen in your childhood? Maybe something similar happened to your villain, only they weren't able to handle it, and it broke them, reshaping them into someone else.
"Write what you know" means to write with authenticity about thoughts, feelings, and experiences. In On Writing, Stephen King says that you should always tell the truth in your writing. When your character smashes his thumb while hammering a nail, is he going to shout out, "Gosh darn it, that smarts!" or is he going to drop an F-bomb? Be honest. Your readers will know when you're lying to them, and the story will suffer.
Your story can take place in the distance past, on an imaginary world, or on another planet. Your characters can be regular people, knights in shining armor, time travellers, or mobsters. Maybe you don't have personal experience with your setting or the circumstances in which your characters find themselves, but when you put yourself in their shoes and write what you know to be real and true in terms of motivation, conflict, and emotion, you are writing what you know, and you will find that connection with your readers--the one that keeps them up late at night, turning page after page to find out what happens next.
Write what you know. Put a little piece of yourself into your characters. This is where your voice comes from. Just as your own personality and experiences make you unique, they will make your writing original and unique as well.