High transverse momentum pion and photon production in pp collisions at ISR energies