I have Linksys WRT54GL with Tomato installed. Unfortently I can't use VLANs with this firmware, so I have to switch to OpenWRT (or DD-WRT). Is it safe to use web interface or I should use tftp way?
You should be safe upgrading to DD-WRT, or any other firmware for that matter, through the Tomato UI.
But, as an alternative, you can continue to use Tomato. It does support VLANS, it uses them by default out of the box (if you go to your device list you will probably see at least one VLAN interface listed). Here is a nice guide to help you setup your own VLANs. It does take a little bit of command line work, but not much, and you can keep with your current Tomato setup.
I have updated from the linksys firmware to dd-wrt, from dd-wrt to tomato, and probably a few other variants. I never had a problem with my 54gl