If the rails have three blocks above them, yes. However, if they are slabbed above (the slabs don't hurt you if you are in them) they won't spawn.
They will spawn on rails, but rails do not count as spawnable space. Over a 4000 block nether rail, which I have traveled many times, they will not spawn. However, with space near the rail which count as an air block, they will spawn. Thus, make sure your tunnel is flush to the wall and has no extraneous air pockets.