You can, but it does not leave any residual ability for the water to neutralize pathogens once you're done treating the water.
If you dip a Nalgene bottle to fill it, then purify the contents, you would typically then bleed the threads by holding the bottle upside down and loosening the cap.
With chemical treatment, the iodine in the water works to neutralize any pathogens that aren't flushed out of the threads. If you've used UV, you're kind of hoping that the flushing action has physically washed out anything lingering in the threads.
Anecdotally, people using UV get more cases of waterborne illness, but I don't know if anyone has rigorously studied this. Hikers are naturally resistant to controlled experiments.
If you don't like the flavor of iodine tablets, I recommend AquaMira instead.
Source: AT ME-MA 2003, GA-ME 2010. UV was pretty popular by 2010 and for a couple years after. Not planning a thru hike at the moment, but I believe the Sawyer squeeze filter is super popular now.
> UVGI for water treatment // Using UV light for disinfection of drinking water dates back to 1910 in Marseille, France. The prototype plant was shut down after a short time due to poor reliability. In 1955, UV water treatment systems were applied in Austria and Switzerland; by 1985 about 1,500 plants were employed in Europe. In 1998 it was discovered that protozoa such as cryptosporidium and giardia were more vulnerable to UV light than previously thought; this opened the way to wide-scale use of UV water treatment in North America. By 2001, over 6,000 UV water treatment plants were operating in Europe
And yes, there are also commercial products for home use.