Minimal weights of mod p Galois representations