Specifying the `Head` of the last argument instead of the first two optional arguments, the following also works

     Options[f] = {"g" -> Identity}; 
     f[x_, y_: 2, z_: 3, opts : OptionsPattern[]] := OptionValue["g"][x + y + z]