It should just work fine.
You don't need to uninstall the GOG version, only change the key.
To change the key you need to use regedit (search in start menu) and expand to the flowing tree's
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Unreal Technology \ Installed Apps \ UT2004
"CDKey"="XXXXX-XXXXX-XXXXX-XXXXX"
Here you can edit your key by double click on "CDkey"
If its not there you probably use 32 bit and you can skip "Wow6432Node"