Application of nanomaterials for integrated and fiber optics