Single-step quantum state engineering in traveling optical fields