Switching 3.3V with a Raspberry Pi gpio pin
You can use a MOSFET to control power through the LEDs like this:







simulate this circuit &ndash; Schematic created using CircuitLab

Simply interrupt the connection between the LEDs and ground and insert an N-MOSFET.  Source to ground, drain to the LED, and the gate to your I/O pin.

You will need to make sure it is a 'logic level' MOSFET to ensure that it is fully on when supplied 3.3V.

A high signal on the I/O will turn the LEDs on, and a low level will turn them off.