Gaussian optical networks for one-dimensional anyons