Yes you can. Like the other poster, if your not on the dining plan, you can charge the snacks to your room key and they will bill your credit card.
If you are on the dining plan, you just use your room key as well and it will subtract the snack from your totals with your package. However, unless it has changed since last Sept., ALOT of the snack locations conveniently do not accept the Disney Dining Plan so look for the sign saying that they accept the DDP.