An efficatious technique is developed to deal with the shape optimization in conctact problems with desired contact traction on a specified contact surface. The error function with appropriate weighting coefficients for smoothing local and global contact traction distribution is proposed. Since the mapping from the space of design variables to the space of error function is usually not differentiable, a Genetic Algorithm is introduced without using the gradient calculations. The boundary element technique together with the transformation matrix method are employed for the contact traction analysis. To demonstrate the versatility and applicability of this approach, two examples with desired traction distributions of elliptical and rectangular types on the specified contact surface are solved respectively.