Interfaces with enhanced dry adhesion have applications in various fields, including robotic grasping and microtransfer printing. Arrays of pillars or fibers with mushroom-like geometries and variations on these have been used to achieve relatively strong adhesion to a broad range of surfaces via surface forces. Here, we investigate the optimal geometries for adhesive pillars through a gradient-based optimization scheme. The scheme minimizes an objective function based on the strain energy release rate of a crack at the pillar edge. The optimal design yields a stress distribution at the interface that is nearly-uniform and free from edge stress singularities. Experiments were performed on millimeter-scale pillars to evaluate the efficacy of the designs. A maximum adhesion enhancement of 2x was achieved for a pillar with a stalk radius equal to half of the contact radius. The location of crack initiation was shifted to the center of the pillar from the edge, indicating that the optimal design does indeed significantly reduce the stress concentration in the near-edge region. This geometric optimization scheme is versatile and can be extended to other scenarios where the control of stresses through geometry can be used to improve the performance of adhered interfaces and bonded joints.