Stellar evolutionary models predict that most of the early type subdwarf stars in close binary systems have white dwarf companions. More massive companions, such as neutron stars or black holes, are also expected in some cases. The presence of compact stars in these systems can be revealed by the detection of X-rays powered by accretion of the subdwarfs stellar wind or by surface thermal emission. Using the Swift satellite, we carried out a systematic search for X-ray emission from a sample of twelve subdwarf B stars which, based on optical studies, have been suggested to have degenerate companions. None of our targets was detected, but the derived upper limits provide one of the few observational constraints on the stellar winds of early type subdwarfs. If the presence of neutron star companions is confirmed, our results constrain the mass loss rates of some of these subdwarf B stars to values <10^{-13}-10^{-12} Msun/yr.