Yes it is fairly simple as long as your switches support it. 802.1Q is a most have with virtualization as it allows you to use multiple VLANs on a single physical switch port which reduces the number of physical NICs that you need in your hosts. Below are several documents that cover how to do this.
<a href="http://www.vmware.com/pdf/esx3_vlan_wp.pdf ">VMware ESX Server 3 802.1Q VLAN Solutions</a>
<a href="http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1280449,00.html">Configuring VLAN's in VMware Infrastructure 3</a>
<a href="http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1283036,00.html">VLAN Configuration on VI3: VST, EST VGT Tagging Tips</a>
<a href="http://kb.vmware.com/kb/1003806">VLAN Configuration on Virtual Switch, Physical Switch, and Virtual Machines - ESX 3.X</a>
<a href="http://kb.vmware.com/kb/1004127">Sample Configuration - ESX connecting to physical switch via VLAN access mode. External Switch VLAN Tagging (EST Mode)</a>
<a href="http://kb.vmware.com/kb/1004074">Sample configuration of virtual switch VLAN tagging (VST Mode) and ESX Server</a>
<a href="http://kb.vmware.com/kb/1004252">Sample configuration of virtual guest VLAN tagging (VGT mode)
</a>