WINGS: a WIde-field Nearby Galaxy-cluster Survey. I. Optical imaging