Debian installs into /target by default. You will have to skip some of the install steps and have a file ready for loopback mounting. Run mkfs.ext2 (or similar) on the file before mounting -o loop.
mount /path/to/file /target -o loop
Normally, with special purpose installs, I skip the debian installer and use debootstrap and apt:
debootstrap wheezy /target http://debmirror/debian
mount -bind /dev /target/dev
'' '' /proc ''
'' '' /sys ''
'' '' /dev/pts /target/dev/pts
apt-get install linux-image grub
... the remainder depends on how you want to deploy the image
(setup grub and linux with debconf)(remember no mbr on fs image)