Yes, 12 is the best you can do, at least without help from some extra irrigation or something fishy with the spacing of the specials. There are several combinations of forest, grassland, coal, oil and game that can be used to get there in 12 turns.
(You can get to size 2 in seven turns if you have, i.e., build on top of, an irrigated oasis, but to get to 40 resources in 4 more turns you would have to also have an oil patches within range of your city. Normally you'll need 5 turns on forest to reach 40 shields after reaching population 2 in 7 turns.)