I've just resolved this issue just playing around a little bit.
In my case I believe I've downloaded Sublime from their website.
It downloaded a folder with all the program and it already came with a sublime_text.desktop.
When I looked at their properties, i went to the Permission tab (2nd one, my ubuntu is in Spanish "Permisos") and checked the last option that says something like "Allow to execute this file as a program".
As soon as i checked that and close the properties, the icon changed to the Sublime one, dissapeared the ".desktop" from the name, and I could execute the program with that file, which I can keep in the dock.
Hope it helps to someone.
PD: sorry for my bad english :P