Yes it is not only allowed but even recommended (Mustahab) to dye the gray beard and gray hair with any color which suits you. Some non Shia Shaikhs claim that black color should not be used. This claim is not authentic and has no evidence. According to authentic Hadeeths, using any color which suits you is allowed.
Wassalam.