Run in terminal
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
for single spacer (repeat command if need more).
Then restart Dock
killall Dock
New spacer appears at the end of Dock. Drag-n-drop it to desired location.
That's all!