Arbitrary bending of optical solitonic beam regulated by boundary excitations in a doped resonant medium