  Prestellar cores are unique laboratories for studies of the chemical and
physical conditions preceding star formation. We observed the prestellar core
L1544 in the fundamental transition of ortho-H2D+ (1_1,0-1_1,1) at different
positions over 100", and found a strong correlation between its abundance and
the CO depletion factor. We also present a tentative detection of the
fundamental transition of para-D2H+ (1_1,0-1_0,1) at the dust emission peak.
Maps in N2H+, N2D+, HCO+ and DCO+ are used, and interpreted with the aid of a
spherically symmetric chemical model that predicts the column densities and
abundances of these species as a function of radius. The correlation between
the observed deuterium fractionation of H3+, N2H+ and HCO+ and the observed
integrated CO depletion factor across the core can be reproduced by this
chemical model. In addition a simpler model is used to study the H2D+
ortho-to-para ratio. We conclude that, in order to reproduce the observed
ortho-H2D+ observations, the grain radius should be larger than 0.3 microns.
