To make this change, find Safari.app in the Finder and do Show Package Contents from the contextual menu. Then go to Contents -> Resources -> English.lproj. Quit Safari and make a backup of Browser.nib. Then open Browser.nib with Interface Builder (requires the Develeoper Tools). Select the leftmost button that isn't greyed out, and open the inspector with Command-Shift-I.
To change the button's behavior, select Connections from the pulldown menu, and click Disconnect. Then pick target/toggleShowBookmarks and click Connect. Save and close Interface Builder and restart Safari.
[Editor's note: I have not tested this myself, and definitely heed the backup advice -- you can fairly easily break the app while working in Interface Builder.]

