Kuria - there is no problem with your configuration idea - it is perfectly feasible - you'll simply need to create 2 a Virtual Switch (or in your case 2 virtual switches - one on each physical NIC - ) then create a PortGroup on each vSwitch with the VLAN config etc for that VLAN.
You then need allocate your VM 2 vNics - and attach those to the 2 different Port Groups that you have created and hosted on each of your vSwitches.
Effectively, you'll be doing the same as creating a Physical server with 2 Physical Nics attached.
Good luck.