Your question ignited an animated discussion over some beers during happy hour at the USGBC Chapter Leaders' Retreat. I posed your question to some residential green building professionals from various climates with the gut feeling that their responses might differ. Once again, it comes down to local climate.
As a generalization, you can use any roofing material, as long as the system is designed such that the dewpoint is not reached inside a closed assembly. That is to say you do not want moisture condensing inside your structure and unable to get out. This can happen when you have moist, warm air on the inside and cold on the outside that causes the moisture to condense. You can end up with mold and moisture damage.
One way to handle this is to allow for an air gap and venting to allow moisture to escape. This was the major point of debate over the unusually large beer steins. We don't employ an air gap in central Arizona. Having recently experienced 2-4% humidity and with temperatures rarely getting down to freezing, we don't have much reason to be concerned about condensation. The representative from Maine had a different perspective and always uses one with venting. The Colorado and Florida representatives said they don't use air gaps but do quite a few calculations to determine where the dew point is going to be reached.
The other consideration is heat transmission. If you are blocking heat transfer (which is the goal and huge advantage of foaming under the roof deck, obviously), then a material that does not emit heat well is going to bake itself in a hot summer. Take asphalt shingles, for example. It is likely their life will be shortened. Metal, for an opposing example, isn't going to take any durability hit. Different materials are going to be appropriate for your architectural style and region.
So, my recommendation is to find a good insulation expert in your area who has at least five years of experience putting in foam insulation this way. If they have had problems, they will have likely learned the hard way by now. Additionally, you may want to find a roofing consultant, someone with a lot of roofing experience that has moved on to doing roof inspections for warranty claims or real estate transactions. They will have seen a lot of bad situations and will likely be a source of good advice for your climate.