Prestellar cores exhibit a strong chemical differentiation, which is mainly caused by the freeze-out of molecules onto the grain surfaces. Understanding this chemical structure is important, because molecular lines are often used as probes to constrain the core physical properties. Here we present new observations and analysis of the C 18 O (1-0) and H 13 CO + (1-0) line emission in the L1498 and L1517B prestellar cores, located in the Taurus-Auriga molecular complex. We model these observations with a detailed chemistry network coupled to a radiative transfer code. Our model successfully reproduces the observed C 18 O (1-0) emission for a chemical age of a few 10 5 years. On the other hand, the observed H 13 CO + (1-0) is reproduced only if cosmic-ray desorption by secondary photons is included, and if the grains have grown to a bigger size than average ISM grains in the core interior. This grain growth is consistent with the infrared scattered light ("coreshine") detected in these two objects, and is found to increase the CO abundance in the core interior by about a factor four. According to our model, CO is depleted by about 2-3 orders of magnitude in the core center.