Optical components based on two-photon absorption process in functionalized polymers