You can do this with ControllerMate:
And a little little AppleScript (each line for each function):
tell application "Spotify" to playpause
tell application "Spotify" to next track
tell application "Spotify" to previous track
If you open QuickTime Player it will silently ignore the play/pause button and prevent iTunes from being opened, if you don't iTunes will still try to play something. Another solution to prevent iTunes from starting is to disable the 'Remote Control Daemon', how to do this is explained in detail on superusersuperuser.