I think you have to specify one or the other, but you can set a low amount as a place holder. Once you start interviewing, you and your freelancer can then decide whether the job will be fixed-rate or hourly.
When you post a job as hourly, you don't specify a rate--only whether you are looking for a Beginner, Intermediate or Expert-level freelancer (which, of course, has some general rate expectations associated with it).
Some clients post that way but note in their postings that they are open to or are looking to convert to a flat-rate arrangement.
For a fixed-price job, as Nichola said, you can include a random number with a note in your posting that it is only a placeholder and freelancers should disregard it and bid appropriate rates. You may not, however, want to employ the common practice of making your placeholder $5, since many freelancers filter out or automatically bypass jobs with such low rates and may never see your note that it is only a placeholder.