I'm not sure about the optical mouse specifically, but CyanogenMod does give you the option to alter the behavior of the various capacitive/hard buttons on the phone to some extent. In Settings->CyanogenMod Settings->Input
you can set the long-press behavior of the home and menu buttons, and completely change the behavior of the search button.
What I've typically done is set the search key (or long-pressing the search key) to open up the voice search app. You could substitute the voice dialer or anything else you wanted if you set it up this way, with the trade-off being that you lose the default search functionality (in my case it's okay because I never use the search button).