That is due to the reflection. The reflection makes the icons narrower ... and that gives the space in between the icons.
Make your customs icons reflective, it will look as same as the default one.
My dock .... with reflective icons ....
The same dock, with normal icons .....
The spacing between the icons are, just because of reflections.