This paper describes a systematic design study of periodic gold-nanostrip arrays placed on a thin film aimed at enhancing the electric field inside the film when irradiated by light. Based on the study, a “selection rule” is proposed, which provides optimization-based design methods with an a priori choice between field-enhancement dominated by coupling to guided modes, by plasmonic near-field enhancement or by a mix hereof. An appropriate choice of wavelength and grating period is shown to selectively suppress or include waveguiding effects for the optimized designs. The validity of the selection rule is demonstrated through a numerical topology optimization study in which gold nanostrips are optimized for electric-field enhancement in an erbium-doped TiO2 thin film, targeting increased spectral upconversion in the erbium ions. The obtained designs exhibit waveguide excitation within the predicted intervals and, for light polarized perpendicularly to the strips, plasmonic response outside.