The German state of Berlin will allow Muslim teachers to wear headscarves, authorities confirmed on Wednesday.