Police in Rio de Janeiro say they killed four people who attacked security forces during an operation against the Red Command gang.