In the same way you'd compose any other passage of music, but ignore the elements of harmony and melody. Although, as with a lot of sound art or noise composition, you can write something with the 'idea' of melody but without precise pitches. Do you want your fill to ascend in pitch, or descend?
Think like this:
- rhythm: Are there any distinctive rhythms in your piece you could re-use here? Make it seem more like a part of the overall piece?
- Dynamics: Is your music loud at this point? Is it getting louder, or quieter. Do you want the fill to be winding down to a quiet point, or get louder and 'drop off'
- Syncopation: Don't forget, this is a chance to feature your drummer's technical ability, try out some distinct rhythms, pick out some beats, try throwing in triplets or look up some latin rhythms.
- Ending: Will your fill end, say, on a cymbal, letting it's sound over-hang into the next part, or end suddenly.
- Feel: Is this a short drum solo? Or a part of the overall rhythmic feel, are you expecting, say, vocals or a solo instrument to be heard at the same time? If so, don't take the focus away from these.
These are all general rules which also apply to other parts of composition, always ask yourself questions about what you want to compose.
It's also worth remembering that most drummers do a lot of work without precise scores and would be perfectly happy to see an empty bar with 'drum fill' written over the top, it really depends how much you want to specify (also, if you have to, if this is a school or college composing project, specify every drum hit).