Can a dryer receptacle be wired without a neutral?
Here is a highlighted image of a random electric dryer schematic.

Click for larger view
Notice that all the control circuits are 120V components, and that basically only the heater is 240V.  Extending this image further, we can see how the dryer connects to a 120/240V split-phase system using a 3 wire cord.

Click for larger view
Due to the nature of the 120/240V split-phase system, the grounded (neutral) and grounding conductors in a dedicated single appliance circuit are basically the same. The dryer will work just fine whether the N terminal is connected to a grounded (neutral) conductor, or a grounding conductor.  However, connecting a NEMA 14-30R device in this way is nonstandard, and a code violation.

NEMA 14-30R
In the case of a three wire circuit, a NEMA 10-30R device should be installed.

NEMA 10-30R
When the wiring is connected to the proper device, the third wire in the cable becomes a grounded (neutral) conductor, and the code may be satisfied.
If you read point number three of the exception to section 250.140 of the National Electrical Code, you'll find that the neutral must be either insulated, or part of a Type SE cable.  If this is not the case, your installation may still be a code violation.
An uninsulated, normally current carrying conductor running through your walls is typically a bad thing.  Which is why this code exception is only valid, if the conductor is insulated.

tl;dr
Connecting a dryer in this way will work, but is a potentially dangerous code violation (according to the National Electrical Code).
If the receptacle is not of the self-contained variety, and is not in a box. That is defiantly a code violation (NEC 2011 406.5).

Extra Information:
If a proper 4 wire cable existed, the schematic from above would look something like this...

Click for larger view

If I've missed anything, or haven't explained something properly. Feel free to ask additional questions, or point out mistakes in the comments below.