Preserving π-conjugation in covalently functionalized carbon nanotubes for ptoelectronic applications