Generally, so long as fiction upholds the moral and spiritual values of Islam, then it's fine.
For example, you might then describe an evil monster - for example, like Darth Vader in Star Wars only to show how he went wrong - being tempted by the dark side - and then how he attempts to redeem himself.
You might also use a metaphor for Allah or one of the prophets as CS Lewis did with Aslan and Christ, or even earlier; the unknown poet who composed Sir Gawain and the Green Knight, and which used the Green Knight as a metaphor for the Divine Mercy/Devotion and a retelling of the story Abraham and his son, Isaac.
Given the esteem that the Prophets are held in Islam I'd suggest against using controversial material like the so-called Satanic Verses (attested by the Islamic historian, al-Tabari) as done by Rushdie. Controversial material, in my opinion, is generally dealt better by prose.
I'd also steer away from stories that deliberately distance themselves away from any moral narrative. For example, like Camus's Outsider where it seems that the sole point of the story is that there is no moral order. It's worth remembering that Camus was an athiest, and he was merely portraying his philosophical world in fiction - one reason why he's applauded by the secular and athiest West - to them, he represents a break with tradition and their past.
I'd also keep in mind your audience - what you can write for children, teenagers and adults will differ given their different capacities to judge and appreciate what they are reading.