A directional Gaussian smoothing optimization method for computational inverse design in nanophotonics