Don't quote me on the exact syntax (I do know the syntax for iptables):
ipfw add allow tcp from site-a.com to any http;
ipfw add allow tcp from site-b.com to any http;
ipfw add allow tcp from site-c.com to any http;
ipfw add deny ip from any to any;
sleep $HOWEVERLONG;
ipfw flush;
I guess the other way would be simply to do ifconfig up when you need a site and take it down again. I don't tend to use such methods because if I'm really susceptible to distraction something else will distract me anyway. I think that self-discipline could be better (when the urge comes to load twitter, just don't do it).