One of my favorite things to do when I'm working on a song is to occasionally ask myself "What would happen if I introduced rock drums into the piece?" This almost always leads the song in fun and interesting directions. I have a tendency to write my songs without any idea where they're going, and most of the time I get interesting results out of that philosophy.
For instance, my song Falling Gracefully starts out low-key with simple, almost jazzy keyboard playing. It then becomes a sort of ambient thing with a choir and adds some electronic percussion and violins for, uh, maybe a new age sound? After that part I actually asked myself the aforementioned question and found out the answer by adding some rock drums and loud synthesizers and hammer instruments. Finally it ended with oboes playing some mellow chords. You can hear the whole thing here.
My point is that I never had any idea of what genres I might be using when I started the piece, I just followed my intuition as I wrote and recorded. For Falling Gracefully, it worked fantastically. Sometimes it doesn't work as well, like in Quantum Foam, where the second half ended up with a much higher quality sound overall than the first, making it inconsistent as a whole.
But it is important to remember that while writing for a specific genre is perfectly fine, constraining a song or (more importantly) all of your work to one genre will eventually limit your creative output. Pop artists tend to stay in one genre because that helps them sell records. But think of legends like the Beatles and Queen, who experimented with multiple genres, sometime in the course of one song. Two of my favorite artists, William Orbit (the Strange Cargo albums in particular) and Matt Uelman (Soundtrack to the game Diablo II) thrive on making their music span all sorts of genres. It is their greatest strength.
Although it is completely possible that you will be able to write 30 pure rock songs (as many artists have done), you will be amazed at the worlds that open up to you when you try out new genres. It is an incredible thrill to see a whole new set of possibilities laid out in front of you. So don't let the concept of genres make you afraid of branching out.