Spain shuts three beaches after oil spill