Piezo-phototronic effect on optoelectronic nanodevices