Tasers can be used in prisons for the first time to tackle "unacceptably high" levels of violence, as part of a new trial.