The main goal of this paper is to study the spatial distribution and the temperature, density, and velocity gradients of the hot molecular gas in regions of massive star formation, on scales ranging from ∼10" to ∼1". To this purpose, we have used the IRAM Plateau de Bure Interferometer (PdBI) to make high angular resolution (∼2") maps in several CH
3CN lines of the molecular clumps associated with the two ultracompact HII regions G10.47+0.03 and G31.41+0.31. Part of the results for G31.41 have already been published (Cesaroni et al.
1994ApJ...435L.137C): here we present the observations of G10.47 and discuss them in relationship to the results obtained for G31.41. We have produced PdBI maps of both sources in the ground state CH
3CN(6-5), CH
313CN(6-5) and vibrationally excited (v
8=1) CH
3CN(6-5) transitions, and in the 2.7 mm continuum emission and
13CO(1-0) line. We also obtained hybrid maps in the CH
3CN(6-5) lines, by merging the interferometer data with the IRAM 30-m telescope maps of Olmi et al. (
1996A&A...307..599O). We derive estimates of the size and mass of the hot molecular cores known from earlier ammonia and methyl cyanide observations. The conclusions drawn by Cesaroni et al. (
1994ApJ...435L.137C) for G31.41 are rediscussed here in view of new results obtained in the
13CO(1-0) line and we show that the disk interpretation for the observed velocity gradient in CH
3CN is to be favoured against the outflow hypothesis; such an outflow is detected in the
13CO(1-0) transition. As in the case of G31.41, we demonstrate that most of the continuum emission at 2.7mm seen towards G10.47 is due to dust and derive a clump mass of ∼2000M
☉. We study the velocity field in G10.47 and detect two trends: an east-west velocity shift is observed in CH
3CN, while in
13CO the velocity increases steadily from south to north. We discuss the possibility that towards G10.47, we observe a disk (in CH
3CN) and an outflow (in
13CO). We conclude that in both sources we are observing low mass halos surrounding massive cores; such cores seem to be flattened rotating structures, which lie at the centre of bipolar outflows.