SANTA CLARA -- The 49ers’ offense had a strong showing on the practice field Wednesday on the second day of the team’s three-day mandatory minicamp.

The offense had one of its best days off the offseason program, as the 49ers have one practice remaining before breaking until the opening of training camp in late-July. The practice was highlighted by back-to-back touchdowns during a team red-zone drill for the first- and second-team offenses.

It was clear that the 49ers’ offense had the right play call against the team’s defense, as running back coach Tom Rathman anticipated a scoring pass. He shouted, “Touchdown! Touchdown!” before quarterback Blaine Gabbert had even taken the snap on a play from the 5-yard line.

And, sure enough, Gabbert found Bruce Ellington racing past Antoine Bethea to the left corner of the end zone for the touchdown.

Moments later, quarterback Thad Lewis hit DeAndrew White for a leaping touchdown on a fade route in the other corner for the end zone against cornerback Keith Reaser for an 8-yard score.

Gabbert, Lewis and rookie Jeff Driskel took the snaps during team drills. Colin Kaepernick practiced when the 49ers were in 7-on-7 drills without a pass rush. Kaepernick again threw the ball accurately in only his second day of work against a defense.

In other observations from the practice field:

--During a 7-on-7 drill, tight end Bruce Miller dropped what would’ve been a 20-yard touchdown pass from Kaepernick. He then failed to hold onto a catchable pass on a crossing pattern with Reaser breaking it up. But on a fourth-down play, Kaepernick and Miller hooked up for a 13-yard touchdown.


--Torrey Smith had another good showing on the practice field, including a catch of 40-plus yards from Gabbert against tight coverage of Jimmie Ward down the field. He also caught a 15-yard touchdown in 7-on-7 drills.

[MAIOCCO: Torrey Smith reflects on Ali, not afraid to speak his mind]

--Other pass-catchers who had good days included Dres Anderson and tight end Je’Ron Hamm.

--Ahmad Brooks and Aaron Lynch spent time working on pass-rush moves with Andre Carter during warmups. Carter, 37, played 13 NFL seasons, including his first five with the 49ers from 2001-’05. He is serving as an intern with the 49ers as part of the Bill Walsh Minority Coaching Fellowship program.

--Lynch, Tank Carradine and Eli Harold generated consistently good pressure during team drills.

--Cornerback Dontae Johnson sat out practice with an apparently leg or ankle injury sustained last week. Coach Chip Kelly Johnson is doing well and should be back shortly. The minicamp wraps up on Thursday.

--Defensive backs coach Jeff Hafley said rookie cornerbacks Rashard Robinson and Prince Charles Iworah have made noticeable improvements with their fundamentals since reporting to the offseason program. Robinson was a fourth-round pick, while Iworah was a seventh-round selection. Third-round pick Will Redmond is rehabbing from ACL surgery.

“I turn on the clips this morning and I’m pointing out, ‘That’s awesome.’ Because when we came in here this is not what that looked like,” Hafley said. “But I watched one play five times, and I was like, ‘That’s awesome.’

“Today it was Prince and Rashard. Those two guys and some of the fundamentals that have improved, it’s fun to watch. Unfortunately, Will can’t practice right now, but in the classroom, he’s on top of it.”

--In a one-on-one matchup of undrafted rookies on the third team, Jason Fanaika (Utah) had a good day against left tackle Norman Price (Southern Mississippi). Fanaika beat Price for three sacks during team drills.

--The 49ers held a post-practice military ceremony for the promotion of Tyson Baynes, who served the past year with the team’s medical and athletic training staff in a fellowship program. Baynes, who serves in the Army, was promoted from captain to major. His last day with the 49ers is June 15, at which point he will take a position at the Office of the Surgeon General.