To do this you need a macro ;-)
I have been using a tremendously simple, but yet very effective Tanking Macro for some time now, and will use it in this example.

    /cast [target=mouseover] Lacerate

I named it "MouseOverLac" in the Macro GUI.
Now to bind it to a key - say button 5 on the mouse - execute this in the chat console:

    /run SetBindingMacro("BUTTON5","MouseOverLac") SaveBindings(2)

Then it works :-)
For your information: The command "SaveBindings(2)" saves the binding in the current char's setup. If you want to make a binding global for alle your chars use "SaveBindings(1)" in stead !

I have observed that bindings can be "forgotten" in some ocasions... I think it is because WoW caches settings for some time, and if you then get a crash due to power loss or the like, then the new bindings dissapear... so after setting up a load of bindings, exit WoW gracefully and enter again to see if it went right ;-)