Yes this is doable, but it would be easier simply to make a separate Golden Tee 2K machine. The cost of a cheap jamma game to convert to Golden Tee makes it kind of silly to try to hook them both up in the same machine.
If it is already a Jamma cabinet then your Golden Tee board should plug right in and the trackball will plug into a separate plug on the Golden Tee board itself. You COULD splice the wires so that the trackball went to both the optipac AND the golden tee boardset. You would also have to splice the golden tee buttons and coin mechs in as well, and then wire a switch that switched power between your Computer and your Arcade power supply (to insure that they both COULD NOT be on at the same time). Oh, there is also the monitor to deal with too.
You could much simplify the issue by using a J-Pac and just splicing the trackball wires to go to both the Golden tee board and the Opti-Pac. You would have to move the Jamma connector to switch between Golden Tee and Mame, AND you would have to either REMEMBER to turn the arcade part off each time (forget once and you will mess stuff up bad), or wire a toggle switch so that they both could not be on at the same time. You would probably want to get an ArcadeVGA card too.
That setup would work just fine, BUT you would be risking your valuable Golden Tee boardset by all the constant handling that you would have to do.
While just making a separate Golden Tee machine would require. One used Jamma cabinet ($100) and a used trackball ($20). You could most likely sell the boardset and controls that were on the cabinet for $40, thus bringing your cost down to $80 (plus the Golden Tee boardset). Not much more expensive than switching them, and it will keep you from damaging your Golden Tee boardset with all the constant switching.