The theory of guided waves in metal-dielectric planar multilayer structures is applied to reduce the loss and maximize optical nonlinearity for efficient terahertz-field generation in a surface electromagnetic wave by femtosecond laser pulses confined in a (chi)((2)) nonlinear planar waveguide. For typical parameters of thin-film polymer waveguides and metal-dielectric interfaces, the optimal size of the (chi)((2)) waveguide core providing the maximum efficiency of terahertz plasmon-field generation is shown to be less than the wavelength of the optical pump field.