The performance of a homogeneous T-mixer can be enhanced significantly by the stimulation of secondary/transverse flows in the microchannel. The groove-based micromixers generate helical flows within the microchannel to augment the mixing performance. These micromixers are extensively studied with respect to planar geometric parameters such as groove width, groove spacing, channel height, etc. The effect of groove shape on mixing performance has not been systematically studied. Previous studies have focused on two or three different predefined groove shapes, typically involving slanted grooves, asymmetric herringbone grooves, and their variations. In this computational study, we analyze the effect of groove shape on micromixing performance and search for the optimal groove shape for a pressure-driven flow across the microchannel. The groove shape is parametrically represented by Bézier curves which could take any shape within a constrained plane. The control points of the Bézier curve are chosen as optimization parameters to identify the optimal groove shape which maximizes the mixing for given operating conditions. The optimization is carried out for pressure-driven flow with and without staggered arrangement of grooves. The resulting single groove optimal design improves the mixing efficiency from 0.18 for T-mixer to 0.85 for the same operating conditions (Re ~0.42, Pe ~4,200). Unlike previous studies, axial mixing index profiles are presented for different micromixers which clearly distinguish the effect of flow field on the mixing performance. Various parametric studies are carried out to compare the optimal groove structure with other common groove type (staggered, herringbone, etc.) micromixers for a range of Pe between 400 and 6,200. The improved mixing performance in optimal designs is due to a continuously growing finger-like structure of the interface which enhances the overall mass transfer.