Localized electronic states and the superconducting gap in Bi2Sr2CaCu2O8+y