Yes you can do this (you don't even have to overwrite the old one, just give the new one a different name and run it from the same directory), but you have to be a little careful. Very old versions of MAME do not use the same format configuration files as new versions. In otherwords, if the versions are too far apart, you will lose your settings and whatnot. What versions are you using?