They can and in fact I have a couple videos of them doing just that- hitting speedboats with Sea Sparrow. However there is a minimum range inside of which Sea Sparrow would be useless. The fact remains that there are things Phalanx can do that can’t be covered by SeaSparrow and deleting Phalanx to save a few dollars seems foolish.
There may be other light gun systems (25mm mk 38) that can do the job and that are less expensive and more capable for that specific job than Phalanx.
http://www.eo.kollmorgen.com/product_spec26.html
http://www.spacewar.com/reports/BAE_Systems_Will_Deliver_Mk_38_Mod_2_Gun_Mounts_To_US_Navy.html
http://www.defenseindustrydaily.com/2006/05/bae-receives-39m-delivery-order-for-mk38-naval-25mm-rws/index.php