If the tasks running in the Virtual Machine will always use less Memory&Cache than you have allocated RAM to the VM, then you will never need SWAP.
Most Installers let you do this (Install w/o a SWAP Partition/File), after warning you, that you should be very sure about your requirements.
If you still want Swap you should know: Swap Files are slower than Swap Partitions.
To answer your Question: Yes, you can use a Swap file instead of a Swap partition, and you should be able to change the setup post-installation.
The general steps are:
- dd if=/dev/zero bs=1M count=2048 of=/path/to/wanted/swapfile/location
- mkswap /path/to/wanted/swapfile/location
- swapon /path/to/wanted/swapfile/location
- swapoff /dev/sdXN # The old swap partition
- edit /etc/fstab to point to new swap file