you would probably be best served using a build of mame that supports 'cleanstretch'. If you're looking for a 'pixel perfect' type display (rather than the softened bilinear filtering), then this will do it by stretching the image and maintaining the aspect ratio, such that it fills the longest dimension of the picture within the fixed resolution of your display, scaling by an exact interger (eg 2x, 3x, 4x).
If your screen supports 1080 lines of resolution, then a game with 270 lines of resolution would be scaled exactly 4x. Games with slightly less, say 256, would be scaled 4x to 1024 lines, giving you a 28 pixel border on the top and bottom of the image. This is of course assuming that your horizontal image would fit with whatever is in that range. Since your vertical is your most limited dimension in a widescreen monitor, i assume it will hit that first.