Efficient numerical method of the fiber Bragg grating synthesis