From the sizes in crenweige's links, it look like 6v group one (1) would match up closest with dimensions of 12v group 22F, 22HF, and 22NF. Your battery compartment should have space for a taller (height) battery, so 22HF might fit (check your space in the battery tray).

Group Maximum Overall Dimensions in inches
Number

6 volt Length, Width, Height
1 9 1/8, 7 1/8, 9 3/8

12 volt Length, Width, Height
22F 9 1/2, 6 7/8, 8 5/16
22HF 9 1/2, 6 7/8, 9
22NF 9 7/16, 5 1/2, 8 15/16

Available Optima sizes are even longer than the above. Their 6v is able to fit the space if it is placed on a diagonal in the battery tray/box (it is longer than group 1 but only about 1/2 as wide). An Optima 12v might not be available for your space.