Writing what you know doesn't mean that if you janitor at night to pay the bills while you learn the craft of writing... you only ever get to write about janitors. What I do believe 'writing what you know' refers to is emotional honesty.
Screenplays are driven by the ups and downs of the main character's quest. The ups and downs refers to both the storyline (action) but the heroine/heroes emotions too. And this is where many new writers come up short. They often side-step tackling the really big emotions. Oh sure, we see death scenes, sex scenes, pillage scenes, car chases - but what we don't see is REAL, GENUINE gut-wrenching emotions that arise from these events.
Often, the new writer doesn't show us the 'fallout' from these events in our hero's life - when its exactly that exploration of emotional subtext to events that makes film REAL to us the audience. It's that bond of shared emotional experience that connects us to the quest of the hero/heroine in the end. So, 'write what you know' means writing from a place of emotional honesty. Either take the risk to write from your very own place of emotional experience or take the time to really understand and empathize with someone who has lived the experience you are going to write about.
LIVE it, (the emotion) and FEEL it, if you're hope to write it and ultimately convince your audience to believe it... and then WRITE it; put that emotion on the page. We all have a 6th sense concerning emotional honesty.... discover yours, and write from THAT place for compelling screenplays. That's my take on what the phrase - write what you know - is really advocating to new writers.
I hope this helps. And I wish you luck with your screenplay - and hey, let me know when you've completed it. I'd love to read your work!