Twisted field theories from factorization algebras