Go to the Video Settings in your Options menu. There’s a slider that allows you to adjust your Optifine resolution. Drag it around until you achieve the resolution you prefer.