The simple answer is yes, you can use SPD pedals on a road bike. In fact, many professional cyclists use SPD pedals for both road and mountain biking. However, there are a few things to keep in mind if you're planning on using SPD pedals on your road bike.
First of all, SPD pedals are designed for mountain biking shoes, which have a different cleat system than road cycling shoes. This means that you'll need to make sure your mountain bike shoes are compatible with your pedal choice before making the switch. Additionally, SPD pedals tend to be heavier than traditional road bike pedals, so they may not be ideal if you're looking to save weight on your setup.
Another thing to consider is the fact that SPD pedals offer less float than road bike pedals. Float is the amount of movement your foot has while clipped in before the pedal disengages from the cleat. This can be important for those who suffer from knee pain or other issues that require a bit more movement while pedaling.
Overall, there's no reason why you can't use SPD pedals on a road bike - just be aware of the potential downsides before making the switch!