..if the car can pass the nct with them it's legal as far as i know.
the problem though is that an HID "filament" is a different shape to a regular bulb. The reflector/lens in your headlight will be set up for a regular halogen bulb, so even when you have the HID filament in exactly the same place the beam patern will be different... this is also why many aftermarket HID kits cause so much glare.
changing the beam pattern can be dangerous for you as well.. better lights aren't just brighter lights.
for instance if you have too much bright light close to the front of the car it limits your ability to see past the throw of your dipped beam into the darkness, because the bright light tends to close up your pupils... you often get the same effect using foglamps in clear weather.